package com.itita.ww2.model.item.enums;

/**
 * 蓝图类别 
 * @author NorthLan
 *
 */
public enum ItemBlueprintType {
	UNKNOWN("00"), TANK("01"), // 坦克图纸
	;

	private String val;

	private ItemBlueprintType(String val) {
		this.val = val;
	}

	public String getValue() {
		return this.val;
	}

	public static ItemBlueprintType idValueOf(String itemId) {
		// itemId,取类别代号 IXXYYZZZZ -> YY
		String typeId = itemId.substring(3, 5);
		for (ItemBlueprintType it : values()) {
			if (it.val.equals(typeId)) {
				return it;
			}
		}
		return UNKNOWN;
	}
}